<?php $this->widget('application.components.adminmenu',array('nameId'=>'userlist')); ?>

<!-- Subheader -->			
<div id="subheader" class="clearfix">
	<h2>Статьи</h2>
	<a href="#"><span>Cancel</span></a>
</div>
<!-- /End Subheader -->

<!-- Main Content Area -->			
<div style="height: max-height;" id="content">
	
	<div id="inner">
	
	 	<div class="pagination" >	  
	       <?php 
	       echo "<a href='/admin/quser/list/1' style='padding: 2px 23px; margin: 2px;float: center;'>Все</a>";
	       foreach (range('a', 'z') as $char)
	       {
	       		echo "<a href='/admin/quser/list/".$char."/1' style='padding: 2px 11px; margin: 2px;float: center;' >".$char."</a>";
	       	
	       }
	       
	       ?>
	    </div>
	    <table class="hover" width="100%">
	        <thead>
	            <tr>
	                <th class="checkbox">
	                    <div class="checker" id="uniform-">
	                        <span>
	                            <input type="checkbox" style="opacity:0;">
	                        </span>
	                    </div>
	               </th>
	               <th>Login</th>
	               <th>User name</th>
	               <th>E-mail</th>
	               <th>Role</th>
	               <th>Date</th>
	           </tr>
	        </thead>
	        <tbody >
			<?php foreach( $user as $key ) { ?>
	            <tr>
	                <td>
	                    <div class="checker" id="uniform-">
	                        <span class="">
	                            <input type="checkbox" style="">
	                        </span>
	                    </div>
	                </td>
	                <td>
                            <?php echo $key->username; ?>
                            <p class="links">
                                <?php echo '<a href="/admin/quser/view/'.$key->user_id.'">Открыть</a>'; ?>
                                <a href="#">Preview</a>
                                <?php echo '<a href="/admin/qpost/del/'.$key->user_id.'">удалить</a>'; ?>                             
                       
                                
                            </p>
                        </td>
	                <td><?php echo $key->Profile->name; ?></td>
	                <td><?php echo $key->email; ?></td>

	                <td><?php echo $key->role; ?></td>
	                <td><?php echo date("d.m.Y",strtotime($key->date));?></td>
	            </tr>
			<?php } ?>
	        
	        </tbody>
	    </table>
	    
	    <!-- Pagination -->
	    <div class="pagination">	  
	        <?php     $this->widget('application.components.MyPagination',array('count_page'=>$count_page,'show_link'=>4)); ?>
	    </div>
	    <!-- end pagination -->
	</div><!-- end inner -->
	
</div><!-- End main content area -->
